package com.easybbs.utils;

import com.easybbs.entity.dto.SysSettingDto;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class SysCacheUtils {
    public static final String CACHE_KEY = "sys_setting";
    public static final Map<String, SysSettingDto> CACHE_DATA = new ConcurrentHashMap<>();

    public static SysSettingDto getSysSetting() {
        return CACHE_DATA.get(CACHE_KEY);
    }
    public static void refresh(SysSettingDto dto){
        CACHE_DATA.put(CACHE_KEY, dto);
    }
}
